#!/bin/bash
if [ "$1" = "init" ]; then
   echo "执行init操作,安装docker"
   curl https://gitee.com/ligson/centos7script/raw/master/centos7init.sh|bash
elif [ "$1" = "rabbitmq" ]; then
   echo "安装rabbitmq"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installMq.sh|bash
elif [ "$1" = "docker-compose" ]; then
   echo "安装docker-compose"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installDockercompose.sh|bash
elif [ "$1" = "rancher" ]; then
   echo "安装rancher"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installRancher.sh|bash
elif [ "$1" = "redis" ]; then
   echo "安装redis"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installRedis.sh|bash
elif [ "$1" = "redis-cluster" ]; then
   echo "安装redis集群"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installRedisCluster.sh|bash -s $2 $3
elif [ "$1" = "gogs" ]; then
   echo "安装gogs"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installGogs.sh|bash
elif [ "$1" = "mysql5.5" ]; then
   echo "安装Mysql5.5"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installMysql5.5.sh|bash
elif [ "$1" = "node-exporter" ]; then
   echo "安装node-exporter"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installNodeExporter.sh|bash -s $2
elif [ "$1" = "prometheus" ]; then
   echo "安装Prometheus"
   curl https://gitee.com/ligson/centos7script/raw/master/crux-tools/installPrometheus.sh|bash 
else
   echo "请输入相关参数.参数选项[init,mq,redis,redis-cluster,docker-compose,rancher,gogs]init代表初始化环境,并且安装docker;mq代表安装mq;redis代表安装redis"
fi
